<template>
	<view class="container">
		<view class="content pad30">
			<view class="hdlist">
				<view class="hdlist_li" v-for="(item,index) in rows" :key="item.id">
					<navigator hover-class="none" :url="'/pages/goodsdetail/goodsdetail?id=0&hdid='+item.id">
						<view class="hdlist_img">
							<image :src="item.image" mode="aspectFill"></image>
						</view>
						<view class="hdlist_title">{{item.name}}</view>
						<view class="hdlist_bot">
							<view class="hdlist_time">有效期：{{item.start}}至{{item.end}}</view>
							<view class="hdlist_state">{{item.txt}}</view>
						</view>
					</navigator>
				</view>


			</view>
		</view>
	</view>
</template>

<script>
	import API from "@/common/api.js";
	export default {
		data() {
			return {
				rows: []
			}
		},
		onLoad() {
			var $this = this
			API.post("common/promotion", {}).then((res) => {
				if (res.code == 1) {
					$this.rows = res.data
				}
			})
		},
		methods: {

		}
	}
</script>

<style lang="scss">
	@import '@/static/style.css';

	.container {
		padding-bottom: 40rpx;
	}
</style>